package request

type CreateRuleRequest struct {
	Symbol        string   `json:"symbol" binding:"required"`
	MinOperator   string   `json:"minOperator" binding:"required,oneof=<= >="`
	MinValue      float64  `json:"minValue" binding:"required"`
	MaxOperator   string   `json:"maxOperator" binding:"required,oneof=<= >="`
	MaxValue      float64  `json:"maxValue" binding:"required"`
	EmailTemplate string   `json:"emailTemplate" binding:"required"`
	Interval      string   `json:"interval" binding:"required,oneof=5m 10m 30m 1h 2h 1d"`
	IsEnabled     bool     `json:"isEnabled"`
	TargetEmails  []string `json:"targetEmails" binding:"required"`
}

type UpdateRuleRequest struct {
	Symbol        string   `json:"symbol" binding:"required"`
	MinOperator   string   `json:"minOperator" binding:"required,oneof=<= >="`
	MinValue      float64  `json:"minValue" binding:"required"`
	MaxOperator   string   `json:"maxOperator" binding:"required,oneof=<= >="`
	MaxValue      float64  `json:"maxValue" binding:"required"`
	EmailTemplate string   `json:"emailTemplate" binding:"required"`
	Interval      string   `json:"interval" binding:"required,oneof=5m 10m 30m 1h 2h 1d"`
	IsEnabled     bool     `json:"isEnabled"`
	TargetEmails  []string `json:"targetEmails" binding:"required"`
}
